﻿using SqlSugar;

namespace RxxAdmin.Model.Logs;

[Tenant("log")]
[SplitTable(SplitType.Month)] //按月分表 （自带分表支持 年、季、月、周、日）
[SugarTable($@"{nameof(LoginLog)}_{{year}}{{month}}{{day}}")]
public class LoginLog
{
    [SugarColumn(IsNullable = false, IsPrimaryKey = true)]
    public long Id { get; set; }
    [SplitField]
    public DateTime? DateTime { get; set; }
    /// <summary>
    /// 登录用户 
    ///</summary>
    [SugarColumn(ColumnName = "LoginUser")]
    public string? LoginUser { get; set; }
    /// <summary>
    /// 登录地点 
    ///</summary>
    [SugarColumn(ColumnName = "LoginLocation")]
    public string? LoginLocation { get; set; }
    /// <summary>
    /// 登录Ip 
    ///</summary>
    [SugarColumn(ColumnName = "LoginIp")]
    public string? LoginIp { get; set; }
    /// <summary>
    /// 浏览器 
    ///</summary>
    [SugarColumn(ColumnName = "Browser")]
    public string? Browser { get; set; }
    /// <summary>
    /// 操作系统 
    ///</summary>
    [SugarColumn(ColumnName = "Os")]
    public string? Os { get; set; }
    /// <summary>
    /// 登录信息 
    ///</summary>
    [SugarColumn(ColumnName = "LogMsg")]
    public string? LogMsg { get; set; }
}
